<template>
  <input type="text" placeholder="请输入用户名:" v-model="user.name">
  <br>
  <input type="password" placeholder="请输入密码:" v-model="user.pwd">
  <input type="radio" name='gender' value="1" v-model="user.gender">男
  <input type="radio" name='gender' value="1" v-model="user.gender">女
  <button @click="f">登录</button>
</template>
<script setup>
import {ref} from "vue";
const user=ref(
    {
      name:'1',
      pwd:'',
      gender:''
    }
)
const f=()=>{
  console.log(user.value);
  console.log(user.value.name);
  console.log(user.value.pwd);
  console.log(user.value.gender);
}
</script>


<style scoped>

</style>